<?php
if (empty ($no_surat)) {
    echo "Tidak ada data";
}
else {
?>
<style>
	h4 {
		font-size:20px;
		font-weight:bold;
		margin:0px;
		margin-bottom:5px;
	}
	page{
		border:1px solid black;
	}
	p{
		margin:5px;
	}
	.header{
		width:95%;
		border-bottom:2px double black;
		padding:10px 0;
	}
	.header img{
		width:100px;
		height:auto;
	}

	table.gridtable {
		font-size:11px;
		color:#333333;
		border-width: 1px;
		border-color: #666666;
		border-collapse: collapse;
	}
	table.gridtable th {
		border-width: 1px;
		padding: 8px;
		border-style: solid;
		border-color: #666666;
		background-color: #dedede;
	}
	table.gridtable td {
		border-width: 1px;
		padding: 8px;
		border-style: solid;
		border-color: #666666;
		background-color: #ffffff;
	}

	table.gridtable2 {
		font-size:12px;
		color:#333333;
		border-width: 0px;
		border-color: #666666;
		border-collapse: collapse;
	}

	table.gridtable3 {
		font-size:15px;
		color:#333333;
		border-width: 0px;
		border-color: #666666;
		border-collapse: collapse;
	}

	table.gridtable2 th {
		border-width: 0px;
		padding: 8px;
		border-style: solid;
		border-color: #666666;
		background-color: #dedede;
	}
	table.gridtable2 td {
		border-width: 0px;
		padding: 8px;
		border-style: solid;
		border-color: #666666;
		background-color: #ffffff;
	}
</style>

<page backtop="50mm" backbottom="5mm" backleft="10mm" backright="3mm">
    <!--page_header>
        <table class="header" cellspacing=0 cellpadding=0>
            <tr>
                <td style="text-align: left;   width: 10%"><img src='<?php base_url()?>asset/images/logo.png' width="10px" height="10px"/></td>
				<td style="text-align: center; width: 80%">
					<h1><?=$nama_kab;?></h1>
					<h2><?=$nama_kec;?></h2>
					<h4><?=$nama_desa;?></h4>	
				</td>
                <td style="text-align: right;   width: 10%"><?=date('d/m/Y'); ?></td>
            </tr>
        </table>
    </page_header-->
    <page_header>
        <table class="header" cellspacing=0 cellpadding=0>
            <tr>
                <td align="center" style="text-align: left;   width: 10%"><img src='<?php base_url()?>asset/images/logo.png'/></td>
				<td style="text-align: center; width: 80%">
					<span align="center" style="font-size:22px; font-weight:bold; margin-top:5px; margin-bottom:5px"><?php echo $nama_kab;?></span><br/>
					<span align="center" style="font-size:22px; font-weight:bold; margin-top:5px; margin-bottom:5px"><?php echo $nama_kec;?></span><br/>
					<span align="center" style="font-size:22px; font-weight:bold; margin-top:5px; margin-bottom:5px"><?php echo $nama_desa;?></span><br/>
					<span align="center" style="font-size:15px; font-weight:italic; margin-top:5px; margin-bottom:5px"><?php echo $alamat_des;?> Tlp. <?=$telp;?></span><br/>
				</td>
                <td style="text-align: right;   width: 10%"><?php //echo date('d/m/Y'); ?></td>
            </tr>
        </table>
    </page_header>
     <page_footer>
        <table class="gridtable" style="widht:100%">
            <tr>
                <td style="text-align: left;    width: 50%"><small><?=$nama_kab?></small></td>
                <td style="text-align: right;    width: 50%"><?=date('d/m/Y'); ?></td>
            </tr>
        </table>
    </page_footer>
    <p></p>
    <div align="center" style="font-size:20px;"><strong><?=$nama_surat;?></strong></div><br/>
    <div align="center" style="font-size:18px;"><?php echo $no_surat;?></div><br/>
	<table class="gridtable3" style="width:100%">
	  <tr>
		<td style="width:100%; text-align:left"><?=$paragraf_1;?></td>
	  </tr>
	  <tr>
		<td style="width:100%; text-align: left"><?=$paragraf_2;?></td>
	  </tr>
	  <tr>
		<td style="width:100%; text-align: left"><?=$paragraf_3;?></td>
	  </tr>
	</table>
	<!--<table style="width:100%;">-->
	<p></p>
	<table class="gridtable2" style="width:100%">
	  <tr>
		<th style="width:90%"><strong>Biodata</strong></th>
		<td></td>
	  </tr>
	</table>
	<table class="gridtable2" style="width:100%">
	  <tr>
		<td style="width:20%">Nama</td>
		<td style="width:2%">:</td>
		<td style="width:50%"><?=$isi['nama'];?></td>
	  </tr>
	  <tr>
		<td style="width:30%">Tempat, Tanggal Lahir</td>
		<td style="width:10%">:</td>
		<td style="text-align:left; width:30%"><?=$isi['t_lahir'];?>, <?=$isi['tgl_lahir'];?></td>
	  </tr>
	  <tr>
		<td>Jenis Kelamin</td>
		<td>:</td>
		<td><?php if($isi['j_kel'] =='L'){
	  		echo "Laki-Laki";	
	  	}else{
	  		echo "Perempuan";
	  	}
	  	?></td>
	  </tr>
	  <tr>
		<td>Kewarganegaraan</td>
		<td>:</td>
		<td><?=$isi['w_negara'];?></td>
	  </tr>
	  <tr>
		<td>Pendidikan</td>
		<td>:</td>
		<td><?=$isi['pendidikan'];?></td>
	  </tr>
	  <tr>
		<td>Agama</td>
		<td>:</td>
		<td><?=$isi['agama'];?></td>
	  </tr>
	  <tr>
		<td>Pekerjaan</td>
		<td>:</td>
		<td><?=$isi['pekerjaan'];?></td>
	  </tr>
	  <tr>
		<td>Status Pernikahan</td>
		<td>:</td>
		<td><?=$isi['s_nikah'];?></td>
	  </tr>
	  <tr>
		<td>Nomor KTP</td>
		<td>:</td>
		<td><?=$isi['no_ktp'];?></td>
	  </tr>
	  <tr>
		<td>Alamat</td>
		<td>:</td>
		<td><?=$alamat;?></td>
	  </tr>
	  <tr>
		<td>Keterangan</td>
		<td>:</td>
		<td><?=$isi['keterangan'];?></td>
	  </tr>
	</table>
	<p></p><p></p><p></p>
	<table class="gridtable3" style="width:100%">
	  <tr>
		<td style="width:100%; text-align: left"><?=$paragraf_4;?></td>
	  </tr>
	</table>
	<p></p><p></p><p></p><p></p><p></p><p></p>
	<table style="width:100%">
     		<tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"><small><?=$nama_desa?>, <?=date('d/m/Y');?></small></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"><?=$ttd[0]['jabatan_ttd'];?></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"><img src="<?=base_url()?>daftar_surat/barcode" float: left></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"><?=$ttd[0]['nama_ttd'];?></td>
     		</tr>
     		<tr>
	     		<td style="width:50%"></td>
	     		<td style="width:50%; text-align: center;"><?=$ttd[0]['nip_ttd'];?></td>
     		</tr>
     	</table>
</page>
<?php } ?>


